<?php

/**
 * Account Bind Module [Account Module]  
 * 
 * @copyright (c) 2015 DZAPP. (http://www.dzapp.cn)
 * @author BranchZero <branchzero@gmail.com> 
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

require libfile('function/member');
require DISCUZ_ROOT.'./source/plugin/dzapp_base/class/class_member.php';

$dzapp_account = explode("\t", authcode($_G['cookie']['dzapp_account'], 'DECODE'));

if($_GET['action'] == 'login') {

	$ctl_obj = new dzapp_logging_ctl();
	$ctl_obj->setting = $_G['setting'];
	$ctl_obj->dzapp_account = $dzapp_account;
	$ctl_obj->template = 'dzapp_base:base_bind';
	$ctl_obj->on_login();

} else {

	$ctl_obj = new dzapp_register_ctl();
	$ctl_obj->setting = $_G['setting'];
	$ctl_obj->dzapp_account = $dzapp_account;
	$ctl_obj->template = 'dzapp_base:base_bind';
	$ctl_obj->on_register();
}

?>